<?php

namespace App\View\Components;

use App\Models\Video;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;

class VideoItem extends Component
{
    public function __construct(public ?Video $video)
    {
        //
    }

    public function render(): View
    {
        return $this->video->getKey()
            ? view('components.video-item')
            : view('components.video-item-empty');
    }
}
